package com.bes.sdk.message;

public class AlarmInfo {

    String Num;
    String RepeatSet;
    String HourValue;
    String MinuteValue;
    String AlarmName;

    public AlarmInfo() {

    }
    public AlarmInfo(String Num, String RepeatSet, String HourValue, String MinuteValue, String AlarmName) {
        this.Num = Num;
        this.RepeatSet = RepeatSet;
        this.HourValue = HourValue;
        this.MinuteValue = MinuteValue;
        this.AlarmName = AlarmName;
    }

    public AlarmInfo(String str){

        String[] parts = str.split(":");

        // 将分割后的字符串数组中的元素存入变量
        Num = parts[0]; // "part1"
        RepeatSet = parts[1]; // "part2"
        HourValue = parts[2]; // "part3"
        MinuteValue = parts[3]; // "part4"
        AlarmName = parts[4];
    }

    // Getter and Setter methods
    public String getNum() { return Num; }

    public void setNum(String Num) { this.Num = Num; }

    public String getRepeatSet() {
        return RepeatSet;
    }

    public void setRepeatSet(String RepeatSet) {
        this.RepeatSet = RepeatSet;
    }

    public String getHourValue() {
        return HourValue;
    }

    public void setHourValue(String HourValue) {
        this.HourValue = HourValue;
    }

    public String getMinuteValue() {
        return MinuteValue;
    }

    public void setMinuteValue(String MinuteValue) {
        this.MinuteValue = MinuteValue;
    }

    public String getAlarmName() {
        return AlarmName;
    }

    public void setAlarmName(String AlarmName) {
        this.AlarmName = AlarmName;
    }

    @Override
    public String toString() {
        return Num + ":" + RepeatSet + ":" + HourValue + ":" + MinuteValue + ":" + AlarmName;
    }
}
